<template>
<div class="searchPage">
 <Top></Top>
<SearchPageTop></SearchPageTop>
  <SearchPageBody></SearchPageBody>
</div>
</template>

<script>
import Top from "@/components/home/Top.vue";
import SearchPageTop from "@/components/search/SearchPageTop.vue";
import SearchPageBody from "@/components/search/SearchPageBody.vue";
import {getArticleListBySearchContent} from "@/api/article";
export default {
  name: "App",
  components:{Top,SearchPageTop,SearchPageBody},
  data(){
    return{
      articleList:"",
      SearchContent:""
    }
  },
  methods:{
    getSearchContent(){
      let url=location.search;
      let SearchContent=url.slice(15);
      this.$store.commit("SEARCH",decodeURIComponent(SearchContent))
      document.title=decodeURIComponent(SearchContent)+'-MSDN搜索';
      getArticleListBySearchContent(SearchContent).then(articleList=>{
        this.$store.commit("commitSearch",articleList)
      })

    }
  },
  mounted() {
    this.getSearchContent();



  }
}
</script>

<style >
*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
html,body{
  width: 100%;
  height: 100%;;
  min-width: 1535px;
}
.Search{
  display: none!important;
}
.top{
  position: static;
}
.publish{
  height: 22px;
}



</style>